{include file="../../../application/admin/view/public/head" /}

<div class="page-container">
    <form class="layui-form layui-form-pane" action="">
        <div class="layui-tab">
            <ul class="layui-tab-title">
                <li class="layui-this">播放器设置</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">

                    <blockquote class="layui-elem-quote layui-quote-nm">
                        提示信息：<br>
                        1，播放器大小支持px像素和%百分比两种单位。<br>
                        2，如果设置的值不包含任何单位，则按照100%处理。
                    </blockquote>

                <div class="layui-form-item" >
                    <label class="layui-form-label">播放器宽度：</label>
                    <div class="layui-input-inline w150">
                        <input type="text" name="play[width]" placeholder="例如: 540px 或 100%" value="{$play.width}" class="layui-input ">
                    </div>
                </div>
                <div class="layui-form-item" >
                    <label class="layui-form-label">播放器高度：</label>
                    <div class="layui-input-block">
                        <input type="text" name="play[height]" placeholder="例如: 460px 或 100%" value="{$play.height}" class="layui-input w150">
                    </div>
                </div>
                <div class="layui-form-item" >
                    <label class="layui-form-label">手机播放宽度：</label>
                    <div class="layui-input-inline w150">
                        <input type="text" name="play[widthmob]" placeholder="例如: 540px 或 100%" value="{$play.widthmob}" class="layui-input ">
                    </div>
                </div>
                <div class="layui-form-item" >
                    <label class="layui-form-label">手机播放高度：</label>
                    <div class="layui-input-block">
                        <input type="text" name="play[heightmob]" placeholder="例如: 460px 或 100%" value="{$play.heightmob}" class="layui-input w150">
                    </div>
                </div>
                <div class="layui-form-item" style="display:none;">
                    <label class="layui-form-label">弹窗口宽度：</label>
                    <div class="layui-input-block">
                        <input type="text" name="play[widthpop]" placeholder="例如: 500px 或 100%" value="{$play.widthpop}" class="layui-input w150">
                    </div>
                </div>
                <div class="layui-form-item" style="display:none;">
                    <label class="layui-form-label">弹窗口高度：</label>
                    <div class="layui-input-block">
                        <input type="text" name="play[heightpop]" placeholder="例如: 460px 或 100%" value="{$play.heightpop}" class="layui-input w150">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">预加载时间：</label>
                    <div class="layui-input-block">
                        <input type="text" name="play[second]" placeholder="例如: 5，单位是秒" value="{$play.second}" class="layui-input w150">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">预加载广告：</label>
                    <div class="layui-input-block">
                        <input type="text" name="play[prestrain]" placeholder="不要出现双引号、单引号等特殊字符号" value="{$play.prestrain}" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">缓冲广告：</label>
                    <div class="layui-input-block">
                        <input type="text" name="play[buffer]" placeholder="不要出现双引号、单引号等特殊字符号" value="{$play.buffer}" class="layui-input">
                    </div>
                </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">解析地址：</label>
                        <div class="layui-input-block">
                            <input type="text" name="play[parse]" placeholder="第三方解析接口" value="{$play.parse}" class="layui-input">
                        </div>
                    </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">自动全屏：</label>
                    <div class="layui-input-block">
                        <input type="radio" name="play[autofull]" value="0" title="关闭" {if condition="$play.autofull neq 1"}checked {/if}>
                        <input type="radio" name="play[autofull]" value="1" title="开启" {if condition="$play.autofull eq 1"}checked {/if}>
                    </div>
                </div>
                <div class="layui-form-item" style="display:none;">
                    <label class="layui-form-label">头部开关：</label>
                    <div class="layui-input-block">
                        <input type="radio" name="play[showtop]" value="0" title="关闭" {if condition="$play.showtop neq 1"}checked {/if}>
                        <input type="radio" name="play[showtop]" value="1" title="开启" {if condition="$play.showtop eq 1"}checked {/if}>
                    </div>
                </div>
                <div class="layui-form-item" style="display:none;">
                    <label class="layui-form-label">列表开关：</label>
                    <div class="layui-input-block">
                        <input type="radio" name="play[showlist]" value="0" title="关闭" {if condition="$play.showlist neq 1"}checked {/if}>
                        <input type="radio" name="play[showlist]" value="1" title="开启" {if condition="$play.showlist eq 1"}checked {/if}>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">播放器文件：</label>
                    <div class="layui-input-block">
                        <input type="radio" name="play[flag]" value="0" title="本地播放器" checked >
                    </div>
                </div>

                <div class="layui-form-item" style="display:none;">
                    <label class="layui-form-label">播放器颜色：</label>
                    <div class="layui-input-block">
                        <input type="text" id="mac_colors" name="play[colors]" placeholder="" value="{$play.colors}" class="layui-input">
                    </div>
                </div>
                    <div class="layui-form-item" style="display:none;">
                        <label class="layui-form-label">选择颜色：</label>
                        <div class="layui-input-block">
                            <button class="layui-btn btn-primary radius" type="button" onclick="setColor(1);return false;" style="background-color: #000000"> 全黑色</button>
                            <button class="layui-btn btn-primary radius" type="button" onclick="setColor(2);return false;" style="background-color: #EFF4F7"> 浅蓝色</button>
                            <button class="layui-btn btn-primary radius" type="button" onclick="setColor(3);return false;" style="background-color: #D8CFDF"> 浅紫色</button>
                            <button class="layui-btn btn-primary radius" type="button" onclick="setColor(4);return false;" style="background-color: #D7E7B6"> 浅绿色</button>
                        </div>
                    </div>

                    <blockquote class="layui-elem-quote layui-quote-nm" style="display:none;">
                        颜色使用16进制表示法，不带#号，以逗号分割，一共15个可配置颜色!
                        <br>依次是：背景色，文字颜色，链接颜色，分组标题背景色，分组标题颜色，当前分组标题颜色，当前集数颜色，集数列表滚动条凸出部分的颜色，滚动条上下按钮上三角箭头的颜色，滚动条的背景颜色，滚动条空白部分的颜色，滚动条立体滚动条阴影的颜色 ，滚动条亮边的颜色，滚动条强阴影的颜色，滚动条的基本颜色
                    </blockquote>

            </div>
            </div>

        </div>
        <div class="layui-form-item center">
            <div class="layui-input-block">
                <button type="submit" class="layui-btn" lay-submit="" lay-filter="formSubmit">保 存</button>
                <button type="button" class="layui-btn layui-btn-normal" id="btnDef">默认值</button>
                <button class="layui-btn layui-btn-warm" type="reset">还 原</button>
            </div>
        </div>
    </form>
</div>

{include file="../../../application/admin/view/public/foot" /}
<script type="text/javascript">
    function setColor(v) {
        switch (v) {
            case 2:
                v = "EFF4F7,000000,666666,E4E4E4,000000,FF0000,FF0000,DBEBFE,458CE4,DBEBFE,FFFFFF,458CE4,DBEBFE,DBEBFE,fcfcfc";
                break;
            case 3:
                v = "D8CFDF,000000,666666,E4E4E4,000000,FF0000,FF0000,D8CFDF,926C92,BEAFC9,FFFFFF,926C92,BEAFC9,BEAFC9,fcfcfc";
                break;
            case 4:
                v = "D7E7B6,000000,666666,E4E4E4,000000,FF0000,FF0000,9EC14C,A3C656,BAD480,FFFFFF,A3C656,BAD480,BAD480,fcfcfc";
                break;
            default:
                v = "000000,F6F6F6,F6F6F6,333333,666666,FFFFF,FF0000,2c2c2c,ffffff,a3a3a3,2c2c2c,adadad,adadad,48486c,fcfcfc";
                break;
        }
        $("#mac_colors").val(v);
    }

    layui.use(['form', 'layer'], function(){
        // 操作对象
        var form = layui.form
            , layer = layui.layer;


        $('#btnDef').click(function(){
            $('input[name="play[width]"]').val('100%');
            $('input[name="play[height]"]').val('100%');
            $('input[name="play[widthmob]"]').val('100%');
            $('input[name="play[heightmob]"]').val('100%');
            $('input[name="play[widthpop]"]').val('600');
            $('input[name="play[heightpop]"]').val('500');
            $('input[name="play[second]"]').val('5');
            $('input[name="play[prestrain]"]').val('//union.maccms.com/html/prestrain.html');
            $('input[name="play[buffer]"]').val('//union.maccms.com/html/buffer.html');
            $('input[name="play[parse]"]').val('//api.maccms.com/parse/?url=');

        });

    });


</script>

</body>
</html>